<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>请稍后</title>
    <link rel="stylesheet" type="text/css" href="../css/common.css">
    <script type="text/javascript" src="../js/adaptive.js"></script>
    <script>
    window['adaptive'].desinWidth = 750;
    window['adaptive'].baseFont = 28;
    window['adaptive'].init();
    </script>
</head>
<style type="text/css">
.mainBox {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colw {
    background: #fff;
}
</style>

<body class="colw">
    <div class="bigBox mainBox">
        <img src="../img/loading.gif" style="width: 4.75rem;height: 4.75rem;" />
    </div>
</body>

</html>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/dlc.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script>
        dlc_request('/wx/getTicket',{},function(res){
            console.log(res);
                var timestamp=(new Date().getTime()/1000).toFixed(0);
				var nonceStr=Math.random().toString(36).substr(2);
				var ticket=wx_js(res.ticket,timestamp,nonceStr);
                wx.config({
                    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端//alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
                    appId: 'wx2c49fec17dc24b80', // 必填，公众号的唯一标识
                    timestamp: timestamp, // 必填，生成签名的时间戳
                    nonceStr:  nonceStr, // 必填，生成签名的随机串
                    signature:ticket ,// 必填，签名，见附录1
                    jsApiList: ['checkJsApi',
                        'onMenuShareTimeline',
                        'onMenuShareAppMessage',
                        'onMenuShareQQ',
                        'onMenuShareWeibo',
                        'hideMenuItems',
                        'showMenuItems',
                        'hideAllNonBaseMenuItem',
                        'showAllNonBaseMenuItem',
                        'translateVoice',
                        'startRecord',
                        'stopRecord',
                        'onRecordEnd',
                        'playVoice',
                        'pauseVoice',
                        'stopVoice',
                        'uploadVoice',
                        'downloadVoice',
                        'chooseImage',
                        'previewImage',
                        'uploadImage',
                        'downloadImage',
                        'getNetworkType',
                        'openLocation',
                        'getLocation',
                        'hideOptionMenu',
                        'showOptionMenu',
                        'closeWindow',
                        'scanQRCode',
                        'chooseWXPay',
                        'openProductSpecificView',
                        'addCard',
                        'chooseCard',
                        'openCard'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
                });
                wx.ready(function(){
                    wx.scanQRCode({
                        needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
                        scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
                        success: function (res) {
									//alert(JSON.stringify(res));
//                            location.href =res.resultStr; // 当needResult 为 1 时，扫码返回的结果
								
							location.href = 'user_index.html?deviceNo='+getUrlParam('deviceNo',null,res.resultStr)+','+getUrlParam('imei',null,res.resultStr)
                        },
                        error:function(err){
                            //alert(JSON.stringify(err));
                        },

                    });
//							setInterval(function(){
//								WeixinJSBridge.call('closeWindow');
//							}, 500);
                })

        })

</script>